import os

# 小程序appid
appid = "2222222222222222"
# 小程序上传私钥
privatekey = "C:/Work/JuCe/private.wx4e63a745ac82ebd2.key"
# 小程序描述
description = "test"


def buildMini(projectName, version):
    print("开始打包发布小程序")
    command = (
        "cli.exe publish --platform mp-weixin --project "
        + projectName
        + " --upload true --appid "
        + appid
        + " --description "
        + description
        + " --version "
        + version
        + " --privatekey "
        + privatekey
    )
    exit_code = os.system(command)
    if exit_code != 0:
        print("命令执行失败")
        exit(1)
    print("发布小程序成功")
